import request from '@/utils/request';

export async function getFakeCaptcha(mobile: string) {
  return request(`/api/login/captcha?mobile=${mobile}`);
}

export interface OnlyLoginParamsType {
  mobile: string;
  password: string;
}

/**
 * 新登录方式
 * @param mobile 
 * @param password 
 */
export async function onlyLogin(payload: OnlyLoginParamsType) {
  return request.post("/AgencyAdmin/loginUser", {
    data: {
      mobile: payload.mobile,
      password: payload.password,
    }
  })
}

/**
 * 登录选择用户接口
 * @param token 
 */
export async function checkUser(token: string) {
	return request.post('/AgencyAdmin/checkUser', {
		data: {
			token,
		}
	})
}
